<template>
  <n-config-provider :theme="theme">
    <n-global-style/>
    <n-message-provider>
      <n-config-provider :locale="zhCN" :date-locale="dateZhCN">
        <n-loading-bar-provider>
          <n-dialog-provider>
            <Content/>
          </n-dialog-provider>
        </n-loading-bar-provider>
      </n-config-provider>
    </n-message-provider>
  </n-config-provider>
</template>
<script lang="ts">
import Content from "./components/layout/Content.vue";
import {defineComponent} from "vue";
import {NConfigProvider, zhCN, dateZhCN} from "naive-ui";
import store from "./store";
import {storeToRefs} from "pinia";

export default defineComponent({
  components: {Content, NConfigProvider},
  setup() {
    const appStore = store();
    const {theme} = storeToRefs(appStore);
    return {
      theme,
      zhCN,
      dateZhCN
    }
  }
})
</script>